package linker.window;

import linker.account.Account;

/**
 * 
 * @version linker 0.93
 * @author Jianfeng jianfeng.linker@gmail.com
 * 
 */

public class LoginProgress implements Runnable {

	private LoginWindow loginWindow;

	private String username;

	private String password;

	private String host;

	private String port;

	private String domain;

	public LoginProgress(LoginWindow lg, String username, String password,
			String host, String port, String domain) {
		this.loginWindow = lg;
		this.username = username;
		this.password = password;
		this.host = host;
		this.port = port;
		this.domain = domain;
	}

	public void run() {
		if (!Account.getAccount().login(username, password, host, port, domain))
			loginWindow.changeWindowForLoginFailed();
		else
			loginWindow.changeWindowForLogin();
	}
}
